man/ostree: Document --repo option a bit more
authorJonathan Lebon <jonathan@jlebon.com>
Mon, 30 Apr 2018 12:53:01 +0000 (08:53 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 30 Apr 2018 17:58:38 +0000 (17:58 +0000)
This new information is already mostly part of `ostree.repo(5)`, though
let's put it in `ostree(1)` as well since that's where the switch is
officially documented.

Closes: #1560
Approved by: cgwalters

man/ostree.xml
src/ostree/ot-main.c

index 8a79cd0490390f1ecbb3764852a983692d7519c8..f8d3e2fc916d535163f723dff36e7882429d40b2 100644 (file)
@@ -111,14 +111,14 @@ Boston, MA 02111-1307, USA.
                 <term><option>--repo</option></term>
 
                 <listitem><para>
-                    For most commands,
-                    when run as non-root, repository is
-                    required.  If
-                    <command>ostree</command> is run as
-                    root, it is assumed operations will be
-                    performed on the
-                    <filename>/sysroot/ostree/repo</filename>
-                    repository.
+                    For most commands, a repository is
+                    required.  If unspecified, the current
+                    directory is used if it appears to be an
+                    OSTree repository. If it isn't, either
+                    the <envar>OSTREE_REPO</envar>
+                    environment variable is used, or the
+                    system repository located at
+                    <filename>/sysroot/ostree/repo</filename>.
                 </para></listitem>
             </varlistentry>
 
index 237427a27ef5a8b139473691898d87642ee0ae05..148c8371bd1bbe163cda87e4a2988ee09bce40e3 100644 (file)
@@ -46,7 +46,7 @@ static GOptionEntry global_entries[] = {
 };
 
 static GOptionEntry repo_entry[] = {
-  { "repo", 0, 0, G_OPTION_ARG_FILENAME, &opt_repo, "Path to OSTree repository (defaults to /sysroot/ostree/repo)", "PATH" },
+  { "repo", 0, 0, G_OPTION_ARG_FILENAME, &opt_repo, "Path to OSTree repository (defaults to current directory or /sysroot/ostree/repo)", "PATH" },
   { NULL }
 };